<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Natrue Picture Lirary</title>
    {{ HTML::style('css/bootstrap.min.css') }}
    {{ HTML::style('css/style.css') }}
</head>

<body>
    <header id="header">

        <div class="container">
            <div id="logo" class="pull-left">
                <h1>中国自然影像库</h1>
            </div>
            <div id="user-info" class="pull-right">
                <ul class="nav navbar-nav not-logged-in">
                @if(Auth::check())
                    <li><a href="#">你好，<span>{{Auth::user()->username}}</span></a></li>
                    @if(Auth::user()->role == 3)
                    <li><a href="/photographer/{{Auth::user()->username}}">个人主页</a></li>
                    @endif
                    <li><a href="/shoppingcart"><i class="glyphicon glyphicon-shopping-cart"></i><span class="badge cart-num">{{ Session::get('cartNum') }}</span></a>
                    </li>
                    <li><a href="javascript:;" id="sidebar-toggle"><i class="glyphicon glyphicon-th-list"></i></a>
                    </li>
                @else
                    <li><a href="#" data-toggle="modal" data-target="#login">登录</a>
                    </li>
                    <li><a href="#" data-toggle="modal" data-target="#register">注册</a>
                    </li>
                @endif

                    <!--
                    <li class="dropdown">
                        <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">语言<span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="javascript:void(0);">简体中文</a>
                            </li>
                            <li><a href="javascript:void(0);">English</a>
                            </li>
                        </ul>
                    </li>
                     -->

                </ul>
                <!-- Login Modal -->
                <div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
                                </button>
                                <h4 class="modal-title" id="myModalLabel">登录</h4>
                            </div>
                            <div class="modal-body">
                                <form role="form" id="login-form" onSubmit="return false;">
                                    <div class="form-group">
                                        <input type="text" name="username" class="form-control" id="input-username" placeholder="用户名或邮箱" />
                                    </div>
                                    <div class="form-group">
                                        <input type="password" name="password" class="form-control" id="input-password" placeholder="密码" />
                                    </div>
                                    <div class="form-group">
                                        <div class="row">
                                            <div class="col-md-6 checkbox">
                                                <label>
                                                    <input type="checkbox" name="remember">记住我
                                                </label>
                                            </div>
                                            <div class="col-md-6 text-right">
                                                <a href="#" data-dismiss="modal" data-toggle="modal" data-target="#forgotpassword">忘记密码？</a>
                                            </div>
                                        </div>
                                    </div>
                                    <div id="login-alert" class="alert alert-danger" style="display: none;">
                                        <ul></ul>
                                    </div>
                                    <div class="form-actions text-center">
                                        <button type="submit" class="btn btn-success">登录</button>
                                        <p>还没有账户？<a href="javascript:void(0);" data-dismiss="modal" data-toggle="modal" data-target="#register">注册</a>
                                        </p>
                                    </div>

                                </form>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Register Modal -->
                <div class="modal fade" id="register" tabindex="-1" role="dialog" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
                                </button>
                                <h4 class="modal-title" id="myModalLabel">注册</h4>
                            </div>
                            <div class="modal-body">
                                <form role="form" id="register-form" onSubmit="return false;">
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="username" id="input-username" placeholder="用户名" />
                                    </div>
                                    <div class="form-group">
                                        <input type="password" class="form-control" name="password" id="input-password" placeholder="密码" />
                                    </div>
                                    <div class="form-group">
                                        <input type="password" class="form-control" name="password_confirmation" id="input-password-confirm" placeholder="确认密码" />
                                    </div>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="email" id="input-email" placeholder="邮箱" />
                                    </div>

                                    <div class="form-group checkbox">
                                        <label>
                                            <input type="checkbox" name="check-register">同意 <a href="javascript:void(0);">《网站服务协议》</a>
                                        </label>
                                    </div>
                                    <div id="register-alert" class="alert alert-danger" style="display: none;">
                                        <ul></ul>
                                    </div>
                                    <div class="form-actions text-center">
                                        <button type="submit" class="btn btn-success">注册</button>
                                        <p>已经有了一个账户？<a href="javascript:void(0);" data-toggle="modal" data-target="#login" data-dismiss="modal">直接登录</a>
                                        </p>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Forgot Password Modal -->
                <div class="modal fade" id="forgotpassword" tabindex="-1" role="dialog" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
                                </button>
                                <h4 class="modal-title" id="myModalLabel">忘记密码</h4>
                            </div>
                            <div class="modal-body">
                                <form id="forgotpassword-form" role="form" action="{{ action('RemindersController@postRemind') }}" method="POST" onsubmit="return false;">
                                    <div class="form-group">
                                        <input type="text" name="email" class="form-control" id="input-email" placeholder="电子邮箱" />
                                    </div>
                                    <div id="forgotpassword-alert" class="alert alert-danger" style="display: none;">
                                        <ul></ul>
                                    </div>
                                    <div class="form-actions text-center">
                                        <button type="submit" class="btn btn-success">确认</button>
                                    </div>

                                </form>
                            </div>
                        </div>
                    </div>
                </div>


            </div>
        </div>
        <div class="main-nav">
            <div class="container">
                <ul class="nav navbar-nav col-md-6">
                    <li><a href="/"><i class="glyphicon glyphicon-home"></i>首页</a>
                    </li>
                    <li><a href="/picture/fresh">最新图片</a>
                    </li>
                    <li><a href="/topic">专题</a>
                    </li>
                    <li><a href="/photographers">摄影师</a>
                    </li>
                    <li><a href="/about">关于我们</a>
                    </li>
                </ul>

                <div class="search col-md-3 pull-right">
                   	<form action="/picture/search" method="post">
						<div class="input-group">
								@if(isset($keyword))
								<input type="text" class="form-control" name="keyword" value="{{ $keyword }}">
								@else
								<input type="text" class="form-control" name="keyword">
								@endif
								<span class="input-group-btn"><button class="btn btn-default" type="submite">搜索</button></span>
						</div>
                    </form>
                </div>
            </div>

        </div>
    </header>
    <div id="main">
        @yield('content')
    </div>
    <footer id="footer">
        <div class="site-information">
            <div class="container">
                <span>自然影像(北京)信息技术有限公司</span>
                <span>86-10-88888888 1350000000</span>
                <span>chinature@wildchina.cn</span>
            </div>

        </div>
        <div class="copyright">
            <div class="container">
                版权申明 | 京ICP证000000号 北京市公安局朝阳分局备案编号10000000000 2014 Chinature.com. All rights reserved
            </div>

        </div>
    </footer>
    @if(Auth::check())
    <div id="sidebar">
        <div class="sidebar-header">
            <a href="javascript:void(0);" class="pull-left">
               @if(Auth::user()->avatar == '')
                   <i class="glyphicon glyphicon-camera pull-left"></i>
               @else
               <img src="{{ '/uploads/avatar/' . Auth::user()->avatar }}" class="pull-left" alt="">
               @endif

                <div class="pull-left">
                    <span class="name">{{Auth::user()->username}}</span>
                    <span class="role">{{Role::find(Auth::user()->role)->name}}</span>
                    <span class="points"></span>
                </div>
            </a>
            <div class="clearfix"></div>
        </div>
        <div class="sidebar-main">
            <h3>导航</h3>
            <ul>
                @if(Auth::user()->role == 3)
                <li><a href="/blog/{{ Auth::user()->username }}">个人博客</a></li>
                <li><a href="/picture/upload">上传图片</a></li>
                <li><a href="/picture/manager">管理图片</a></li>
                <li><a href="/topic/management">专题</a></li>

                @endif

                <li><a href="/project">选片台</a></li>
                <li><a href="/shoppingcart">购物车<span class="badge cart-num">{{ Session::get('cartNum') }}</span></a></li>
                <li><a href="/order">订单详情</a></li>
                <li><a href="javascript:void(0);">购买记录</a></li>
                <li><a href="/user/edit">账户编辑</a></li>

            </ul>

            @if(Auth::user()->role == 1)
            <h3>超级管理</h3>
            <ul>
                <li><a href="/user/manage">用户管理</a>
                </li>
                <li><a href="javascript:void(0);">订单管理</a>
                </li>
                <li><a href="/picture/manager">相片管理</a>
                </li>
                <li><a href="/categories/management">分类管理</a>
                </li>
                <li><a href="javascript:void(0);">设置</a>
                </li>
            </ul>
            @endif
        </div>
        <div class="sidebar-footer">
            {{HTML::link('user/logout','退出')}}
        </div>
    </div>
    @endif

    <div class="modal fade" id="photo-modal" tabindex="-1" role="dialog" aria-labelledby="Photo Details" aria-hidden="true" data-width="750px">
        <div class="modal-dialog" style="width:800px;">
            <div class="modal-content">

            </div>
        </div>
    </div>

    <div class="modal fade bs-project-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
      <div class="modal-dialog modal-sm">
        <div class="modal-content">

        </div>
      </div>
    </div>

    <div class="modal fade" id="topic-modal" tabindex="-1" role="dialog" aria-labelledby="Topic Details" aria-hidden="true">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">

            </div>
        </div>
    </div>
    <div class="modal fade" id="picture-edit-modal" tabindex="-1" role="dialog" aria-labelledby="Topic Details" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">

            </div>
        </div>
    </div>


    <div class="modal fade" id="project-info-modal" tabindex="-1" role="dialog" aria-labelledby="Topic Details" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">

            </div>
        </div>
    </div>

<script type="text/template" id="alert-template">
<div class="alert <%=alertType%>" role="alert">
    <%=body%>
    <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
</div>
</script>


    {{ HTML::script('js/jquery.min.js') }}
    {{ HTML::script('js/underscore-min.js') }}

    {{ HTML::script('js/bootstrap.min.js') }}
    {{ HTML::script('js/masonry.pkgd.min.js') }}
    {{ HTML::script('js/imagesloaded.pkgd.min.js') }}
    {{ HTML::script('js/vendor/jquery.ui.widget.js') }}


    {{ HTML::script('js/load-image.min.js') }}
    {{ HTML::script('js/load-image-ios.js') }}
    {{ HTML::script('js/load-image-orientation.js') }}
    {{ HTML::script('js/load-image-meta.js') }}
    {{ HTML::script('js/load-image-exif.js') }}
    {{ HTML::script('js/load-image-exif-map.js') }}



    {{ HTML::script('js/jquery.iframe-transport.js') }} {{ HTML::script('js/jquery.fileupload.js') }}

    <!-- The XDomainRequest Transport is included for cross-domain file deletion for IE 8 and IE 9 -->
    <!--[if (gte IE 8)&(lt IE 10)]>
    {{ HTML::script('js/cors/jquery.xdr-transport.js') }}
    <script src="js/cors/jquery.xdr-transport.js"></script>
    <![endif]-->




    {{ HTML::script('js/main.js') }}

</body>

</html>
